package Iterator_Pattern.TV;

import java.util.List;

// -*-coding:utf-8 -*-
//人员：刘陆鑫
//班级：19软3
//学号；2019110218
public class TvIterator implements AbstractIterator{
    private List<Object>tvs;
    private int cursor1;
    public TvIterator(TvList list){
        this.tvs=list.getObjects();
        cursor1=0;
    }

    public Object getNextItem() {
        return tvs.get(cursor1++);
    }

    public Object getPreviousItem() {
        return tvs.get(cursor1--);
    }
}
